﻿using System;
using System.Collections.Generic;

namespace Looptribe.WinRT.Toolkit.Controls.CalendarPrimitives
{
    class DayData
    {
        private readonly DateTime _date;
        public DateTime Date
        {
            get { return _date; }
        }

        private readonly bool _isCurrentMonth;
        public bool IsCurrentMonth
        {
            get { return _isCurrentMonth; }
        }

        private readonly ICalendarEvent[] _events;
        public IEnumerable<ICalendarEvent> Events
        {
            get { return _events; }
        }

        public int Day
        {
            get { return Date.Day; }
        }

        public bool IsRegularDay
        {
            get
            {
                return IsCurrentMonth &&
                    Date.DayOfWeek != DayOfWeek.Sunday &&
                    Date.DayOfWeek != DayOfWeek.Saturday;
            }
        }

        public DayData(DateTime date, bool isCurrentMonth, ICalendarEvent[] events)
        {
            _date = date;
            _isCurrentMonth = isCurrentMonth;
            _events = events;
        }
    }
}
